
CROSS := mipsel-linux-
INC := ./ #../libpcap-0.9.4
#LIB := ../libpcap-0.9.4/libpcap.a
LIB := libpcap.a
TARGET := packetredirect
SRC := packetredirect.c
OBJ := $(SRC:.c=.o)

all:
	$(CROSS)gcc -s -O2 -Wall  -I$(INC) -c $(SRC)
	$(CROSS)gcc -s -O2 -Wall  -I$(INC) -o $(TARGET) $(OBJ) $(LIB)
	$(CROSS)strip --remove-section=.note --remove-section=.comment $(TARGET)

clean:
	rm -f $(TARGET) $(OBJ)
